|
Command: |
Verify a MAC on a message. |
|
Notes: |
The message to be MAC’d by this command may be presented to the HSM in different formats, as indicated by the Input Format Flag field. When Input Format Flag = 2, the input message goes through a conversion process (from EBCDIC to ASCII) when the HSM is configured as using EBCDIC. |
|
Field |
Length & Type |
Details | |
|
COMMAND MESSAGE |
|||
|
Message Header |
m A |
Will be returned to the Host unchanged. |
|
|
Command Code |
2 A |
Value M8. |
|
|
Mode Flag |
1 N |
0 : Only block of a single-block message |
|
|
Input Format Flag |
1 N |
0 : Binary |
|
|
MAC Algorithm |
2 N |
01 : ISO 9797 MAC algorithm 1 (= ANSI
X9.9 when used with a single-length key) |
|
|
Padding Method |
1 N |
For MAC Algorithm values 01 & 03: For all other MAC Algorithm values: |
|
|
Key Type |
3 H |
Type of Key. The following Key Types are permitted: 003 : TAK |
|
|
Key |
16H |
MAC Key. |
|
|
IV |
16 H |
The intermediate IV. |
|
|
Message Length |
4 H |
The length of the following field, in bytes. |
|
|
Message |
|
The message upon which the MAC is to be verified. The length & type of the field will depend on the value of the Mode Flag & Input Format Flag: |
|
|
n B |
Input Format Flag = 0 (Binary); |
||
|
n H |
Input Format Flag = 1 (Hex-encoded
Binary); |
||
|
n A |
Input Format Flag = 2 (Text); |
||
|
MAC |
8 H |
The MAC to be verified. |
|
|
End Message Delimiter |
1 C |
Optional. Must be present if a message trailer is present. Value X'19. |
|
|
Message Trailer |
n A |
Optional. Maximum length 32 characters. |
|
|
RESPONSE MESSAGE |
|||
|
Message Header |
m A |
Will be returned to the Host unchanged. |
|
|
Response Code |
2 A |
Value “M9”. |
|
|
Error Code |
2 N |
00 : No error Any standard error code. |
|
|
IV |
16 H |
The intermediate IV. |
|
|
End Message Delimiter |
1 C |
Will only be present if present in
the command message. Value X'19. |
|
|
Message Trailer |
n A |
Will only be present if present in the command message. Maximum length 32 characters. |
|
|
|
|
|
|